<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/sitemesh-decorator.tld" prefix="decorator" %>
<%@ taglib uri="/WEB-INF/sitemesh-page.tld" prefix="page" %>
<%@ page import="nc.vo.ebvp.logindex.pojo.Constant"%>
<%@ page import="nc.bs.ecpubapp.tools.ECVersionPara"%>
<%@ page import="nc.vo.ebvp.constant.IModuleCodeConstant"%>
<%@ taglib uri="/WEB-INF/lang-support.tld" prefix="lang-support"%> 
<%
	String path = request.getContextPath();
	String url = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort();
	Boolean isEcSupp = (Boolean)request.getSession().getAttribute(Constant.IS_EC_SUPP);
	// 只有潜在供应商与核准合格供应商可以进行招投标业务，核准不合格与无扩展信息的供应商不允许参加招投标
	// by zhangjxf 2014-05-19 20:03:00    BUG:NCdp205043086
	Boolean isValidSupForZhaobiaoBid = (Boolean)request.getSession().getAttribute(Constant.IS_VALID_SUPPLIER_FOR_ZHAOBIAO_BID);
	String strSysId = (String)request.getSession().getAttribute("run_sys_id");
	boolean bIsScmSys = false;
	if("SCM".equals(strSysId)){
		bIsScmSys = true;
	}
	boolean bIsEsbSys = false;
	if("ESB".equals(strSysId)){
		bIsEsbSys = true;
	}
	//Object obj = session.getAttribute("suppName");
	Object suppPk = session.getAttribute("suppNamepk");
	String header_logo = (String)request.getSession().getAttribute("header_logo");
	java.util.Map<String,Boolean> mapModulesStatus = (java.util.Map<String,Boolean>)session.getAttribute(IModuleCodeConstant.MODULE_SESSION_ID);
	boolean bModuleSRM = mapModulesStatus.get(IModuleCodeConstant.MODULE_SRM).booleanValue();
	boolean bModuleSCM_PU = mapModulesStatus.get(IModuleCodeConstant.MODULE_SCM_PU).booleanValue();
	boolean bModuleSCM_CT = mapModulesStatus.get(IModuleCodeConstant.MODULE_SCM_CT).booleanValue();
	boolean bModuleSCM_IC = mapModulesStatus.get(IModuleCodeConstant.MODULE_SCM_IC).booleanValue();
	boolean bModuleSCM_IC_SYS = mapModulesStatus.get(IModuleCodeConstant.MODULE_SCM_IC).booleanValue() && bIsScmSys;
	boolean bModuleARAP = mapModulesStatus.get(IModuleCodeConstant.MODULE_ARAP).booleanValue();
	boolean bModuleEBP = mapModulesStatus.get(IModuleCodeConstant.MODULE_EBP).booleanValue();
	boolean bModuleSCM_IC_EBP_SYS = bModuleSCM_IC && bModuleEBP && bIsScmSys;
	boolean bModuleEBVSC = mapModulesStatus.get(IModuleCodeConstant.MODULE_EBVSC).booleanValue();
	boolean bModuleEBVSC_SYS = mapModulesStatus.get(IModuleCodeConstant.MODULE_EBVSC).booleanValue() && bIsScmSys;
	boolean bModuleEBPOrSRM = bModuleEBP || bModuleSRM;
	String strHelpHtml = (String)request.getParameter(Constant.HELP_HTML);
	if(null == strHelpHtml){
		strHelpHtml = (String)request.getAttribute(Constant.HELP_HTML);
	}
	String strSelLan = (String)request.getSession().getAttribute("sel_lan");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head >
	 <script>
    	var basePath = "<%=url%>/";
		var isEcSupp = "<%=isEcSupp%>";
		var isValidSupForZhaobiaoBid = <%=isValidSupForZhaobiaoBid%>;
		var strUserCode = "${USER_CODE}";
		var strUserId = "${USER_ID}";
		var strCert = "${SERVER_CERT}";
		var strSelLan = "<%=request.getSession().getAttribute("sel_lan")%>";
		var bModuleSRM = <%=bModuleSRM%>;
		var bModuleSCM_PU = <%=bModuleSCM_PU%>;
		var bModuleSCM_CT = <%=bModuleSCM_CT%>;
		var bModuleSCM_IC = <%=bModuleSCM_IC%>;
		var bModuleSCM_IC_SYS = <%=bModuleSCM_IC_SYS%>;
		var bModuleARAP = <%=bModuleARAP%>;
		var bModuleEBP = <%=bModuleEBP%>;
		var bModuleSCM_IC_EBP_SYS = <%=bModuleSCM_IC_EBP_SYS%>;
		var bModuleEBVSC = <%=bModuleEBVSC%>;
		var bModuleEBVSC_SYS = <%=bModuleEBVSC_SYS%>;
		var bModuleARAPOrSCM_PU = <%=(bModuleARAP || bModuleSCM_PU)%>;
		var bModuleARAPOrSCM_PU_IC = <%=(bModuleARAP || bModuleSCM_PU || bModuleSCM_IC)%>;
		var bModuleEBPOrSCM_PU = <%=(bModuleEBP || bModuleSCM_PU)%>;
		var bModuleEBPOrSCM_CT = <%=(bModuleEBP || bModuleSCM_CT)%>;
		var bModuleEBPOrSCM_PU_CT = <%=(bModuleEBP || bModuleSCM_PU || bModuleSCM_CT)%>;
		var bModuleEBPOrSRM = <%=(bModuleEBP || bModuleSRM)%>;
		var bModuleEBVSCOrSCM_PU = <%=(bModuleEBVSC || bModuleSCM_PU)%>;
		var bIsScmSys = <%=bIsScmSys%>;
		var bIsEsbSys = <%=bIsEsbSys%>;
		var bStdVersion = <%=ECVersionPara.isStdVersion()%>;	
    </script>
	<title><decorator:title default="Yonyou NC "/></title>
    <base href="<%=url+path+"/"%>"></base>
    <meta http-equiv="keywords" content="NC">
    <meta http-equiv="description" content="">
    <META http-equiv="Content-Type" content="text/html; charset=utf-8" > 
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    
    <link rel="stylesheet" type="text/css" href="commonres/base/base.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/frame.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/myframe.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/header.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/footer.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/sidebox.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/subpage.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/channel.css" />
	<link rel="stylesheet" type="text/css" href="commonres/common/frame/src/css/validator.css" />
	
	<script type="text/javascript" src="commonres/base/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="commonres/tools/util.js"></script>
    <script type="text/javascript" src="commonres/tools/utilTool.js"></script>
    <script type="text/javascript" src="commonres/tools/validatorTool.js"></script>  
	
    
	<script type="text/javascript" src="commonres/common/frame/src/js/top_menu.js"></script>
	<script type="text/javascript" src="commonres/base/common.js"></script>
  	<script type="text/javascript" src="/web/component/webpub/core/seajs2/dist/sea-debug.js"></script>
  	<script type="text/javascript" src="component/ebvp/core/config.js"></script>
  	<script type="text/javascript" src="/web/component/webpub/tools/jquery.validation/jquery.validate.js" charset="utf-8"></script>
 

    <!-- UI Plugin -->
    <link rel="stylesheet" type="text/css" href="commonres/common/approve/src/css/approve.css"/>
    <script type="text/javascript" src="commonres/common/approve/src/js/UI.Approve.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/column_menu/src/css/column_men.css" />
    <script type="text/javascript" src="commonres/common/column_menu/src/js/UI.ColumnMenu.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/countdown_timer/src/css/countdown_timer.css" />
	<script type="text/javascript" src="commonres/common/countdown_timer/src/js/UI.Countdown.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/drop_dialog/src/css/drop_dialog.css" />
    <script type="text/javascript" src="commonres/common/drop_dialog/src/js/UI.DropDialog_bank.js"></script>
	<script type="text/javascript" src="commonres/common/drop_dialog/src/js/UI.DropDialog.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/drop_menu/src/css/drop_menu.css" />
    <script type="text/javascript" src="commonres/common/drop_menu/src/js/UI.DropMenu.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/finish_steps/src/css/finish_steps.css" />
    <script type="text/javascript" src="commonres/common/finish_steps/src/js/UI.FinishSteps.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/inner_flow/src/css/inner_flow.css" />
    <script type="text/javascript" src="commonres/common/inner_flow/src/js/UI.OperationFlow.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/list_pager/src/css/list_pager.css" />
    <script type="text/javascript" src="commonres/common/list_pager/src/js/UI.ListPager.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/navigator/src/css/navigator.css" />
    <script type="text/javascript" src="commonres/common/navigator/src/js/UI.Navigator.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/operation_flow/src/css/operation_flow.css" />
    <script type="text/javascript" src="commonres/common/operation_flow/src/js/UI.OperationFlow.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/reminder/src/css/reminder.css" />
    <script type="text/javascript" src="commonres/common/reminder/src/js/UI.Reminder.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/slideshow/src/css/slideshow.css" />
    <script type="text/javascript" src="commonres/common/slideshow/src/js/UI.Slideshow.js"></script>
    <link rel="stylesheet" type="text/css" href="commonres/common/tipinside/src/css/tipinside.css" />
    <script type="text/javascript" src="commonres/common/tipinside/src/js/UI.TipInside.js"></script>
    <script type="text/javascript">
    var heigth = 600;
    $(function() {
    	if($( ".doc_content_shadow" ).length > 0){
	    	var heightvalue = $( ".doc_content_shadow" ).css("height");
			heigth = new Number(heightvalue.substring(0,heightvalue.length-2));
			var pageHeight = screen.height-250;
			if( heigth < pageHeight){
				$( ".doc_content_shadow" ).css({'height': pageHeight});
				$( ".doc_content" ).css({'height': pageHeight});
				heigth = pageHeight;
			}
			heigth = heigth - 80;
		}
		//formsAddCSRFToken(); // CSRF 20160727
    });
    function init(){
    	if("<%=suppPk%>" == ""){
    		window.location.href='/ebvp/login/loginOut';
    	}
    }
    // CSRF防御
    function formsAddCSRFToken() {
		// 得到页面中所有的 form 元素
		var forms = document.getElementsByTagName('form');
		for(i=0; i<forms.length; i++) {
			// 动态生成 input 元素，加入到 form 之后
			var e = document.createElement("input");
			e.id = "csrftoken";
			e.name = "reqCSRFToken";
			e.value = "${sesCSRFToken}";
			e.type="hidden";
			forms[i].appendChild(e);
		}
	}
    </script>
    <decorator:head/>
</head>
<body onload="init();">
<!-- Page Header -->
<div class="header">
	<div class="header_bg_left">
		<div class="header_bg_right">
			<div class="float_center doc_width">
				<div class="header_content doc_width">
					<%if(null != suppPk){%>
					<div id="signedInNavigatorBar" class="header_navigator"></div>
					<%}%>
					<div class="<%=header_logo%>"> </div>
					<%if(null != suppPk){%>
					<div class="header_functions">
						<div class="signon">
							<span class="icon"></span>
							<span id="userName"><%=session.getAttribute("suppName")%></span>
						</div>
						<a href="<%=request.getContextPath()%>/login/loginOut" class="register">
							<span class="icon"></span>
							<span resid="0ec22400-000040"></span>
						</a>
						<a href="." class="service" id="selfService"> 
							<span class="icon"></span>
							<span resid="0ec22400-000041"></span>
							<span class="arrow"></span>
						</a>
						<%if(null != strHelpHtml && !"".equals(strHelpHtml.trim())){%>
							<a href="javascript:void(null);" onclick="doHelp('<%=request.getContextPath()%>/help/<%=strSelLan%>/html/<%=strHelpHtml%>');" class="register">
								<span resid="0ec22400-000111">帮助</span>
							</a>
						<%}%>
					</div>
					<%}%>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- Document Content -->

<decorator:body />

<!-- Page Footer -->
<!--<div class="float_left w_100ps">
    <div class="footer">
				<%
					if (ECVersionPara.isStdVersion()) {
				%>
                <br/><div resid="0ec22400-000042"></div>
                <%
                	} 
                %>
        <div class="footer_bg bg_left">
            <div class="footer_bg bg_right">
           	 	<%
					if (ECVersionPara.isStdVersion()) {
				%>
                <br/><div resid="0ec22400-000042"></div>
                <%
                	} 
                %>
            </div>
        </div>
    </div>
</div>-->
<script type="text/javascript">
	seajs.use(['jquery','jquery.ui.datepicker'],function($,datepicker){
		$ = datepicker($);
	});
</script>
</body>
	<script type="text/javascript">
		changeLan();
    </script>
</html>